#!/bin/sh
# regenerate module dependencies after pruning kernel modules
# (this script must run after anything touching /lib/modules)

cd /lib/modules
for i in *.*; do
	if [ "$i" = "*.*" ]; then
		echo "** error: no valid KFLAVOURS installed, bailing out" >&2
		exit 1
	fi
	depmod -a -F /boot/System.map-$i $i
done
